package view;

import android.content.Context;
import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;

import com.example.xuegengwang.xuegengwang.R;

/**
 * Created by Administrator on 2017/3/25.
 */

public class MyClickableSpan extends ClickableSpan {
    private String string;
    private Context context;

    public MyClickableSpan(String string, Context context) {
        this.string = string;
        this.context = context;
    }
    @Override
    public void updateDrawState(TextPaint ds) {
        int color = context.getResources().getColor(R.color.common_color);
        ds.setColor(color);
        ds.setUnderlineText(false); //去掉下划线
    }

    @Override
    public void onClick(View widget) {
//        Intent i = new Intent();
//
//        context.startActivity(i);
    }
}
